package com.ling.pl.autoproject.definition.entity.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 实体数据库结构
 */
public class EntityDBStructure {
    @Column(name = "DB_ID", length = 36)
    @ModelProperty(comment = "数据库id")
    String dbId;

    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "实体id")
    String entityId;

    @Column(name = "INDEX_TYPE", length = 50)
    @ModelProperty(comment = "对象类型")
    @Dict(code = "builder.entity.dbType", des = "表,列,视图,外键约束,数据库索引")
    String indexType;

    @Column(name = "NAME", length = 150)
    @ModelProperty(comment = "中文名称")
    String name;

    @Column(name = "CODE", length = 150)
    @ModelProperty(comment = "数据库索引名称", des = "IDX_.....")
    String code;

    @Column(name = "NAME")
    @ModelProperty(comment = "用户自定义")
    Boolean isManual;

    @Column(name = "SQL", length = 1500)
    @ModelProperty(comment = "sql")
    String sql;
}
